<?php
$connect = mysqli_connect("216.185.102.20", "runningman","runningman", "mfidatabase");
if (mysqli_connect_errno()) {
    printf("Connect failed: %s\n", mysqli_connect_error());
    exit();
}

// while loop ??
//while (){
//}

$sql_section_d_info = "SELECT * FROM creditscoresectionD WHERE `id`='2'";

echo "testing";

if ($result = mysqli_query($connect,$sql_section_d_info)) 
{
	while($sql_get_row = mysqli_fetch_array($result))
	{
		extract($sql_get_row);

		$birthday = $sql_get_row['d_o_b'];
		echo "Age: " + $year_diff;

		echo $sql_get_row['d_o_b'] . " : " . $sql_get_row['martial_status']	. " : " . $sql_get_row['num_of_children'] . " : " . $sql_get_row['resident_status']
			 . " : " . $sql_get_row['employment_status'] . " : " . $sql_get_row['gross_salary_pone'] . " : " . $sql_get_row['occupation'];
	}
}
else
{
	printf ("fail:test");
}

    list($year,$month,$day) = explode("/",$birthday);
    $year_diff  = date("Y") - $year;
    $month_diff = date("m") - $month;
    $day_diff   = date("d") - $day;

    if ($day_diff < 0 || $month_diff < 0)
	{
      $year_diff--;
	}

	 /* free result set */
    mysqli_free_result($result);

mysqli_close($connect);

?>